import React from 'react';

export default class Dstream extends React.Component{
    constructor(props){
        super(props)
        this.state={
            msg:"胥建平"
        }
    }
    inputChange=(e)=>{
        console.log("改变值");
        this.setState({
            msg:e.target.value
        })
    }

    render(){
        return (
            <div>
                <input value={this.state.msg} onChange={this.inputChange}/>
                {this.state.msg}
            </div>
        )
    }

}